<template>
  <div class="body">
    <header class="header">
      <div class="container">头部</div>
    </header>
    <main class="main">
      <div class="main-wrapper">
        <nuxt/>
      </div>
    </main>
    <footer class="footer">
      <div class="container">尾部</div>
    </footer>
  </div>
</template>

<style>
body,
html {
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
#__layout,
#__nuxt,
.body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.header {
  position: sticky;
  top: 0;
  background: #fff;
}
.footer,
.header {
  flex-shrink: 0;
}
.main {
  flex-grow: 1;
  flex-basis: 100%;
}
.main-wrapper {
  min-height: 100%;
}
</style>
